<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<!--suppress HtmlRequiredTitleElement -->
<head>
    <th:block th:include="include :: header('代码生成列表')"/>
    <link rel="stylesheet" th:href="@{/static/assets/system/css/gen.css}">
    <th:block th:include="include :: highlightjs('atom-one-light')"/>
</head>
<body class="layui-layout-body theme-himio" onscroll="layui.admin.hideFixedEl();">
<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表格工具栏 -->
            <form class="layui-form toolbar table-tool-mini">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label w-auto">表名称:</label>
                        <div class="layui-input-inline">
                            <label>
                                <input name="tableName" class="layui-input" autocomplete="off"/>
                            </label>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label w-auto">表描述:</label>
                        <div class="layui-input-inline">
                            <label>
                                <input name="tableComment" class="layui-input" autocomplete="off"/>
                            </label>
                        </div>
                    </div>
                    <div class="layui-inline" style="padding-right: 110px;">
                        <button class="layui-btn icon-btn" lay-filter="genTbSearch" lay-submit>
                            <i class="layui-icon layui-icon-search"></i>搜索
                        </button>
                    </div>
                </div>
            </form>
            <!-- 数据表格 -->
            <table id="genTable" lay-filter="genTable"></table>
        </div>
    </div>
</div>

<!-- 表格操作列 -->
<script type="text/html" id="genTbBar">
    <a class="layui-btn icon-btn layui-bg-cyan layui-btn-sm" lay-event="preview"
       shiro:hasPermission="tool:gen:preview"><i class="fa fa-eye"></i>预览</a>
    <a class="layui-btn icon-btn layui-bg-blue layui-btn-sm" shiro:hasPermission="tool:gen:edit"
       ew-href="/tool/gen/edit?tableId={{d.tableId}}" target="_blank" ew-title="{{d.tableName}} 生成信息配置">
        <i class="fa fa-edit"></i>编辑
    </a>
    <a class="layui-btn icon-btn layui-bg-orange layui-btn-sm" lay-event="sync" shiro:hasPermission="tool:gen:edit"><i
            class="fa fa-refresh"></i>同步</a>
    <a class="layui-btn icon-btn layui-bg-red layui-btn-sm" lay-event="del" shiro:hasPermission="tool:gen:remove"><i
            class="fa fa-trash"></i>删除</a>
    <a class="layui-btn icon-btn layui-bg-green layui-btn-sm" lay-event="gen" shiro:hasPermission="tool:gen:code"><i
            class="fa fa-code"></i>生成代码</a>
</script>

<!-- js部分 -->
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var listFlag = [[${@permission.hasPermit('tool:gen:list')}]];
    var addFlag = [[${@permission.hasPermit('tool:gen:add')}]];
    var editFlag = [[${@permission.hasPermit('tool:gen:edit')}]];
    var removeFlag = [[${@permission.hasPermit('tool:gen:remove')}]];
    var previewFlag = [[${@permission.hasPermit('tool:gen:preview')}]];
    var codeFlag = [[${@permission.hasPermit('tool:gen:code')}]];
    var dictSysYesNo = [[${@dict.getType('sys_yes_no')}]];
    var prefix = ctx + "tool/gen";
</script>
<script th:src="@{/static/assets/system/js/gen.js}"></script>
</body>
</html>